From bb7670b698be35d9b27adf04d15e63125b9e7d5a Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Thu, 19 Oct 2006 15:15:36 +0100 Subject: [PATCH] [ACM] An environment where ACM and its tools have not been installed before will throw an error during 'make' of the test suite. This fixes the problem. Signed-off-by: Stefan Berger --- tools/xm-test/tests/security-acm/01_security-acm_basic.py | 3 +++ tools/xm-test/tests/security-acm/Makefile.am | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/xm-test/tests/security-acm/01_security-acm_basic.py b/tools/xm-test/tests/security-acm/01_security-acm_basic.py index 569b004c18..6459bb9fd8 100644 --- a/tools/xm-test/tests/security-acm/01_security-acm_basic.py +++ b/tools/xm-test/tests/security-acm/01_security-acm_basic.py @@ -24,6 +24,9 @@ testlabel = "blue" vmconfigfile = "/tmp/xm-test.conf" testresource = "phy:ram0" +if not isACMEnabled(): + SKIP("Not running this test since ACM not enabled.") + status, output = traceCommand("xm makepolicy %s" % (testpolicy)) if status != 0 or output != "": FAIL("'xm makepolicy' failed with status %d and output\n%s" % diff --git a/tools/xm-test/tests/security-acm/Makefile.am b/tools/xm-test/tests/security-acm/Makefile.am index b2979b842a..7b691712f2 100644 --- a/tools/xm-test/tests/security-acm/Makefile.am +++ b/tools/xm-test/tests/security-acm/Makefile.am @@ -15,7 +15,10 @@ TESTS_ENVIRONMENT=@TENV@ %.test: %.py cp $< $@ chmod +x $@ - @cp -f xm-test-security_policy.xml /etc/xen/acm-security/policies + @if [ -d /etc/xen/acm-security/policies ]; then \ + cp -f xm-test-security_policy.xml \ + /etc/xen/acm-security/policies; \ + fi; clean-local: am_config_clean-local -- 2.30.2